How to get a list of all tables in Oracle?
How to get a list of all tables in Oracle?
470
17-Jul-2023
Updated on 18-Jul-2023
Aryan Kumar
18-Jul-2023There are a few ways to get a list of all tables in Oracle. Here are a few of the most common methods:
all_tablesview: Theall_tablesview is a data dictionary view that contains information about all of the tables in the database. You can use theSELECTstatement to select thetable_namecolumn from theall_tablesview to get a list of all tables.SQL
user_tablesview: Theuser_tablesview is a data dictionary view that contains information about all of the tables in the schema that the user is currently logged in to. You can use theSELECTstatement to select thetable_namecolumn from theuser_tablesview to get a list of all tables in the current schema.SQL
DBA_TABLESview: TheDBA_TABLESview is a data dictionary view that contains information about all of the tables in the database, including tables that are owned by other users. You can use theSELECTstatement to select thetable_namecolumn from theDBA_TABLESview to get a list of all tables in the database.SQL
Which method you use will depend on your specific needs. If you need a list of all tables in the database, then you can use the
all_tablesorDBA_TABLESviews. If you only need a list of tables in the current schema, then you can use theuser_tablesview.